package com.example.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 民宿表
 * </p>
 *
 * @author
 *
 */
@Getter
@Setter
@ApiModel(value = "Homestays对象", description = "民宿表")
public class Homestays implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("民宿名称")
    private String name;

    @ApiModelProperty("民宿类型：别墅、公寓、木屋等")
    private String type;

    @ApiModelProperty("所在地区")
    private String area;

    @ApiModelProperty("详细地址")
    private String address;

    @ApiModelProperty("每晚价格")
    private BigDecimal price;

    @ApiModelProperty("描述")
    private String description;

    @ApiModelProperty("入住规则")
    private String rules;

    @ApiModelProperty("容纳人数")
    private Integer capacity;

    @ApiModelProperty("卧室数量")
    private Integer bedrooms;

    @ApiModelProperty("床位数量")
    private Integer beds;

    @ApiModelProperty("浴室数量")
    private Integer bathrooms;

    @ApiModelProperty("评分")
    private BigDecimal rating;

    @ApiModelProperty("评价数量")
    private Integer reviewCount;

    @ApiModelProperty("浏览量")
    private Integer viewCount;

    @ApiModelProperty("状态：0-下架，1-上架")
    private Integer status;

    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime time;

    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;

    @ApiModelProperty("封面")
    private String img;


    @TableField(exist = false)  // 如果数据库中没有这个字段，需要加这个注解
    private List<String> image;  // 新增的图片数组字段


}
